<?php
class Protox_View
{
    /**
     * @var Zend_View_Interface
     */
    private $view;

    /**
     * Inicializa o objeto View
     * 
     * @return Zend_View
     */
    public function  __construct($view) {
        return $this->view = $view;
    }

    /**
     * Carrego o objeto View
     * 
     * @return Zend_View
     */
	public function init()
	{
        $config = Zend_Registry::get('config');

        $this->view->setEncoding($config->resources->view->encoding);
        $this->view->doctype($config->resources->view->doctype);
        $this->view->headMeta()->appendHttpEquiv('Content-Type', $config->resources->view->contentType);
        $this->view->headMeta()->appendHttpEquiv('Content-Language', $config->resources->view->contentLanguage);
        $this->view->headMeta($config->resources->view->robots, 'robots');
        $this->view->headTitle($config->sistema->sigla);
        $this->view->headTitle()->setSeparator(' - ');
        $this->view->setHelperPath($config->resources->view->helpers, 'View_Helper');
        $this->view->addHelperPath($config->resources->view->dojo,'Zend_Dojo_View_Helper');
		$this->view->addHelperPath($config->resources->view->jquery,'ZendX_JQuery_View_Helper');
		    
        return $this->view;
    }
}